package com.ovopark.organize.server.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ovopark.organize.server.model.entity.FranchiseesApprovalAddress;
import com.ovopark.organize.server.model.entity.FranchiseesRegistration;
import com.ovopark.organize.server.model.query.FranchiseesApprovalAddressQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 选址点位
 * @Author:
 * @Date:
 */
public interface FranchiseesApprovalAddressMapper extends BaseMapper<FranchiseesApprovalAddress> {

    /** 
     * @description: 选址点位列表 分页 检索
     * @param: [page, groupId, query]
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.ovopark.organize.server.model.entity.FranchiseesApprovalAddress>
     * @author wxb
     * @date: 2024/6/6 16:42
     */ 
    IPage<FranchiseesApprovalAddress> getPage(@Param("page") Page<FranchiseesApprovalAddress> page,
                                         @Param("groupId") Integer groupId,
                                         @Param("query") FranchiseesApprovalAddressQuery query);

    /** 
     * @description: 根据点位获取线索列表 分页
     * @param: [page, groupId, addressId]
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.ovopark.organize.server.model.entity.FranchiseesRegistration>
     * @author wxb
     * @date: 2024/6/6 16:35
     */ 
    IPage<FranchiseesRegistration> getPageByAddressId(@Param("page") Page<FranchiseesRegistration> page,
                                                      @Param("groupId") Integer groupId,
                                                      @Param("addressId") Integer addressId);

    /** 
     * @description: 根据点位获取线索列表
     * @param: [groupId, addressId]
     * @return: java.util.List<com.ovopark.organize.server.model.entity.FranchiseesRegistration>
     * @author wxb
     * @date: 2024/6/6 16:34
     */ 
    List<FranchiseesRegistration> getByAddressId(@Param("groupId") Integer groupId,
                                                 @Param("addressId") Integer addressId);

    /** 
     * @description: 线索下的点位列表
     * @param: [registrationId, groupId]
     * @return: java.util.List<com.ovopark.organize.server.model.entity.FranchiseesApprovalAddress>
     * @author wxb
     * @date: 2024/6/6 16:34
     */ 
    List<FranchiseesApprovalAddress> getByRegistrationId(@Param("registrationId") Integer registrationId, @Param("groupId") Integer groupId);
}
